<!-- 赞 -->
<div class="entry-controls clearfix">
	<div class="vote-section-wrapper clearfix">
		<button class="btn btn-default btn-zan" id="likeBtn"><i class="fa fa-thumbs-o-up"></i> <span id="likeNum">{{$.post.LikeNum}}</span> likes</button>
		<span class="control-item read-counts"><i class="fa fa-eye"></i> {{if $.post.ReadNum}}{{$.post.ReadNum}}{{else}}1{{end}}</span>
	</div>
	<div class="right-section">
		<div id="weixinQRCode"></div>
		<button class="btn btn-share btn-default btn-weibo"><i class="fa fa-weibo"></i> Weibo</button>
		<button class="btn btn-share btn-default btn-weixin"><i class="fa fa-wechat"></i> Wechat</button>
		<div class="dropdown" style="display: inline-block; cursor: pointer; padding: 5px 10px; padding-right: 30px">
			
			<div class="dropdown-toggle" data-hover="dropdown" data-toggle="dropdown">
				<i class="fa fa-ellipsis-h"></i>
			</div>
			<ul class="dropdown-menu" role="menu">
				<li><a href="#" class="btn-share tencent-weibo"><i class="fa fa-tencent-weibo"></i> Tencent Weibo</a></li>
				<li><a href="#" class="btn-share qq"><i class="fa fa-qq"></i> QQ Zone</a></li>
				<li><a href="#" class="btn-share renren"><i class="fa fa-renren"></i> RenRen</a></li>
			</ul>
		</div>
	</div>
	<div class="voters clearfix" id="likers">
	</div>
</div>

<script type="text/x-jsrender" id="tLikers">
[[for users]]
	<a id="liker_[[:UserId]]" title="[[:BlogTitle]]" href="[[:BlogUrl]]" target="_blank" class="voter">
		[[if Logo]]
			<img alt="avatar" class="avatar-small" src="[[:Logo]]">
		[[else]]
			<img alt="avatar" class="avatar-small" src="/images/blog/default_avatar.png">
		[[/if]]
	</a>
[[/for]]
</script>
{{if and $.blogInfo.OpenComment (not (eq $.blogInfo.CommentType "disqus"))}}

<script type="text/x-jsrender" id="tComments">
[[for comments]]
	<li class="comment-item">
		<!-- 头像 -->
		<a ui-hovercard="" target="_blank" class="avatar-link" title="[[:UserInfo.Username]]" href="[[:UserInfo.BlogUrl]]">
			<img class="avatar" src="[[:UserInfo.Logo]]">
		</a>
		<!-- 评论 -->
		<div class="comment-body">
			<div class="comment-hd">
				<a href="[[:UserInfo.BlogUrl]]" target="_blank" >[[:UserInfo.Username]]</a>
				[[if IsAuthorComment]]
				<span>(Author)</span>
				[[/if]]
				
				<!-- 回复其它人 -->
				[[if ToUserInfo]]
					<span class="in-reply-to">
			        reply to
			        <a href="[[:ToUserInfo.BlogUrl]]">[[:ToUserInfo.Username]]</a>
					</span>
					[[if ToUserIsAuthor]]
					<span>(Author)</span>
					[[/if]]
				[[/if]]
			</div>
			<div class="comment-content">
				[[html:Content]]
			</div>
			<div class="comment-ft clearfix" data-comment-id="[[:CommentId]]" >
				<span title="" ui-time="" class="date">[[:PublishDate]] </span>
				<span class="like-num [[if !LikeNum]]hide[[/if]]" title="[[:LikeNum]] likes"><span class="like-num-i">[[:LikeNum]]</span> likes</span></span>
				
				[[if ~root.visitUserInfo.UserId]]
					[[if IsMyNote && !IsMyComment]]
						<a href="javascript:;" class="comment-trash op-link "><i class="fa fa-trash"></i> Delete</a>
					[[/if]]
					[[if !IsMyComment]]
					<a href="javascript:;" class="comment-reply op-link ">
						<i class="fa fa-reply"></i>
						Reply
					</a>
					<a href="javascript:;" class="comment-like op-link"><i class="fa fa-thumbs-o-up"></i> <span class="like-text">[[if IsILikeIt]]Unlike[[else]]Like[[/if]]</span></a>
					[[else]]
					<a href="javascript:;" class="comment-trash op-link "><i class="fa fa-trash"></i> Delete</a>
					[[/if]]
				[[/if]]
			</div>
			
			<!-- 回复该评论 -->
			[[if ~root.visitUserInfo.UserId]]
			<form class="comment-form comment-box-ft">
				<div class="clearfix">
					<div class="avatar-wrap">
						<img class="avatar" src="[[:~root.visitUserInfo.Logo]]">
					</div>
					<div class="editor-wrap">
						<textarea class="editable" id="commentContent" name="commentContent" placeholder="Reply"></textarea>
					</div>
				</div>
				
				<div class="command clearfix" style="display: block;">
					<button class="reply-comment-btn save btn btn-primary" data-comment-id="[[:CommentId]]">Submit</button>
					<a class="cancel reply-cancel btn-link">Cancel</a>
				</div>
			</form>
			[[/if]]
		</div>
	</li>
[[/for]]
</script>

<!-- 评论 -->
<div class="comment-box hide">
	<form class="comment-form comment-box-ft hide" id="commentForm">
		<div class="clearfix">
			<div class="avatar-wrap">
				<img class="avatar" id="visitUserLogo">
			</div>
			<div class="editor-wrap">
				<textarea class="editable" id="commentContent" name="commentContent" placeholder="Your comment here" style="height: 100px;"></textarea>
			</div>
		</div>
		<div class="command clearfix" style="display: block;">
			<button id="commentBtn" class="reply-comment-btn save btn btn-primary">Submit</button>
		</div>
	</form>
	<div class="needLogin hide" id="noLoginContainer">
		<a onclick="goLogin()">Sign in</a> to leave a comment.
		<br />
		No Leanote account? <a onclick="goRegister()">Sign up now.</a>
	</div>
	<div class="box-header">
	    <span class="counter">
	      <i class="icon icon-comment"></i><span id="commentNum">{{$.post.CommentNum}}</span> comments
	    </span>
    </div>
    <!-- 评论列表 -->
	<ul id="comments">
	</ul>
</div>

<!-- 更多评论 -->
<div id="moreComments">
	<div class="hide comments-more">
		<a>More...</a>
	</div>
	<div class="comments-loading">
		<img src="/images/loading-32.gif" />
	</div>
</div>
{{end}}

{{if and $.blogInfo.OpenComment (eq $.blogInfo.CommentType "disqus")}}

<div id="disqus_thread"></div>
<!-- comment -->
<script type="text/javascript">
    /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
    var disqus_shortname = '{{.blogInfo.DisqusId}}'; // required: replace example with your forum shortname
    var disqus_identifier = '{{.blogInfo.UserId}}/{{$.post.NoteId}}/{{$.post.Title}}'; // 博客链接

    /* * * DON'T EDIT BELOW THIS LINE * * */
    (function() {
        var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
        dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    })();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
{{end}}	